<?php
require_once 'vendor/autoload.php';

$app = new \think\App();
$app->initialize();

echo "检查配置加密状态...\n";

$configs = \app\model\SystemConfig::where('config_key', 'in', ['xiaofeng_order_token', 'xiaofeng_create_order_token'])->select();

foreach($configs as $config) {
    echo $config['config_key'] . " - is_encrypted: " . ($config['is_encrypted'] ? 'true' : 'false') . " - value: " . $config['config_value'] . "\n";
    
    // 测试解密
    if ($config['is_encrypted'] && !empty($config['config_value'])) {
        $decrypted = \app\model\SystemConfig::getConfig($config['config_key']);
        echo "  解密后: " . $decrypted . "\n";
    }
}

echo "\n测试完成！\n"; 